package com.huawei;
import java.util.*;
/**
 * Created by Z-hong on 2024/7/11.
 */

public class HJ93_mid {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int count = scanner.nextInt();
        List<Integer> in=new ArrayList<>();
        int all=0;
        int result=0;
        for (int i = 0; i < count; i++) {
            int num=scanner.nextInt();
            if(num%5!=0&&num%3!=0){
                in.add(num);
            }
            if(num%5==0){result+=num;}
            all+=num;
        }
        if(all%2!=0){
            System.out.println("false");
            return;
        }
        int target = all/2;
        if(in.size()==0&&target==0){
            System.out.println("true");
            return;
        }

        in.sort((a,b)->a-b);
        System.out.println(getMin(in,result,target));
    }

    public static boolean getMin(List<Integer> in,int result,int target){
        boolean flag=false;
        //循环in相加
        for (int i = 0; i < in.size(); i++) {
            int temp=in.get(i);
            in.remove(i);
            if(temp+result==target){return true;}
            flag=getMin(in,result+temp,target);
            if(flag){return true;}
            in.add(i,temp);
        }
        return false;
    }

}
